package com.example.supernote.data.network.config


import kotlinx.serialization.Serializable
import java.util.UUID

@Serializable
data class RequestBody(
    val dataId: String = "",
    val styleConfig: String = "",
    val prompt: String,
    val width: Int = 400,
    val height: Int = 400,
    val cfgScale: Int = 15,    // [3, 15]
    val denoisingStrength: Int = 1,    // [0, 1]
)

fun getRequestBody(prompt: String, styleConfig: String): RequestBody =
    RequestBody(
        dataId = UUID.randomUUID().toString(),
        prompt = prompt,
        styleConfig = styleConfig,
        width = 400,
        height = 400,
        cfgScale = 15,    // [3, 15]
        denoisingStrength = 1,    // [0, 1]
    )


@Serializable
data class ResponseData(
    val task_id: String = "",
    val task_type: String = "",
    val model: String = "",
    val status: Int = 0,
    val task_eta: Int = 0,
    val images_url: List<String> = listOf()
)

@Serializable
data class Response(
    val code: Int,
    val result: ResponseData,
    val msg: String
)

fun getImageStyle(): Map<String, String> = mapOf(
    "通用v3" to "55c682d5eeca50d4806fd1cba3628781",
    "通用v4" to "8fe3d641be3e589dad231dc6c3b1429a",
    "真人" to "77ae34fc0ac9569282cdc46f939adb2e",
    "科幻" to "5b53a9a477b511edb27eb58d5a2004e6",
    "卡通" to "cb32064bfcf355cbb183e701cbaa35e4",
    "风景" to "8eecb606c9ac58ee8b60324dd55c1a2e",
    "二次元" to "02accd1877b411edb27eb58d5a2004e6",
    "梦幻动漫" to "85ae2641576f5c409b273e0f490f15c0",
    "唯美写实" to "85062a504de85d719df43f268199c308",
    "绯红烈焰" to "b3aacd62d38c5dbfb3f3491c00ba62f0",
    "彩绘日漫" to "4cb72f01767b57ad9074968845e6cab6",
    "赛博朋克" to "384a036a93f356708957efd1bbbf5921",
)